package com.xiaoh.dormitoryrepairreportbackend.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 工单物料表
 */
@TableName(value = "work_order_material")
@Data
@Schema(description = "工单物料表")
public class WorkOrderMaterial implements Serializable {

    /**
     * 记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @Schema(description = "记录ID")
    private Long id;

    /**
     * 工单ID
     */
    @TableField(value = "work_order_id")
    @Schema(description = "工单ID")
    private Long workOrderId;

    /**
     * 物料ID
     */
    @TableField(value = "material_id")
    @Schema(description = "物料ID")
    private Integer materialId;

    /**
     * 使用数量
     */
    @TableField(value = "quantity_used")
    @Schema(description = "使用数量")
    private Integer quantityUsed;

    /**
     * 记录人ID
     */
    @TableField(value = "recorded_by")
    @Schema(description = "记录人ID")
    private Long recordedBy;

    /**
     * 记录时间
     */
    @TableField(value = "created_at")
    @Schema(description = "记录时间")
    private LocalDateTime createdAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}
